package com.tanhua.dubbo.api;

import lombok.Getter;

@Getter
public enum UserTypeEnum {
    STRIGIFORMES("猫头鹰"),
    COELHO("白兔型"),
    FOX("狐狸型"),
    LION("狮子型");


    private final String name;

    UserTypeEnum(String name) {
        this.name = name;
    }

    public static UserTypeEnum parse(String name) {
        UserTypeEnum[] userTypes = UserTypeEnum.values();
        for (UserTypeEnum userType:
             userTypes) {
            if (name.equals(userType.getName())) {
                return userType;
            }
        }
        return null;
    }
}
